﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Text.RegularExpressions;


public class Utility
{
    public static string AutoConvertToHTML(string content)
    {
        Regex url_regex = new Regex(@"(http:\/\/([\w.]+\/?)\S*)", RegexOptions.IgnoreCase | RegexOptions.Compiled);
        Regex email_regex = new Regex(@"([a-zA-Z_0-9.-]+\@[a-zA-Z_0-9.-]+\.\w+)", RegexOptions.IgnoreCase | RegexOptions.Compiled);
        content = url_regex.Replace(content, "<a href=\"$1\" target=\"_blank\">$1</a>");
        content = email_regex.Replace(content, "<a href=mailto:$1>$1</a>");
        return content;
    }
    public enum Roles
    {
        Manager=1,
        User=2
    }
}